<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

	<ui:composition template="/templates/common.xhtml">

		<ui:define name="pageTitle">Detalhe Pessoa</ui:define>

		<ui:define name="pageHeader">Pessoa</ui:define>

		<ui:define name="body">
			
			<h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputText value="Identificador:"/>
                    <h:outputText value="#{personDetailController.person.personId}" title="Identificador" />
                    <h:outputText value="Nome:"/>
                    <h:outputText value="#{personDetailController.person.name}" title="Nome" />                    
                    <h:outputText value="Data:"/>
                    <h:outputText value="#{personDetailController.person.birthDate}" title="Data">
              						<f:convertDateTime pattern="dd/MM/yyyy" />
 					</h:outputText>
               </h:panelGrid>
               <p><b>Experiências</b></p>
               <table>
               <ui:repeat value="#{personDetailController.person.personExperiences}" var="item" varStatus="loop">
               <tr>
               		<td>Empresa*:</td><td> <h:outputText value="#{item.enterpriseName}"/></td>
               </tr>
               </ui:repeat>
               </table>
               <br/><br/><br/>
               
               <h:commandButton value="Voltar" action="person_list" immediate="true" />
	        </h:form>
                    
		</ui:define>
	</ui:composition>
</html>